package cn.edu.scau.cmi.tancuier.composite.safe;

import java.util.ArrayList;

public class SafeTeam extends SafeOrganization{

	public SafeTeam(String name) {
		super(name);
	}

	private ArrayList<SafeOrganization> children = new ArrayList<SafeOrganization>();
	
	public void addChild(SafeOrganization child) {
		children.add(child);
	}
	
	public void deleteChild(SafeOrganization child) {
		children.remove(child);
	}
	
	public ArrayList<SafeOrganization> getChildren() {
		return children;
	}

	public void setChildren(ArrayList<SafeOrganization> children) {
		this.children = children;
	}

	@Override
	public String display(int depth) {
		StringBuilder s = new StringBuilder();
		s.append(" |--");
		for(int i =0; i < depth; i++) {
			s.insert(0, " |   ");
		}
		return s.toString();
	}
	
}
